package com.zjitc.Redis;

import java.lang.reflect.Field;
import java.security.Key;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import sun.awt.SunHints.Value;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/10 16:13
 * @description:
 */
public class Myredis {
  private JedisPool jedisPool;
  public Myredis(JedisPool pool){
    this.jedisPool= pool;
  }
  public void hset(String key,String field,String value){
    Jedis jedis =null;
    try {
      Jedis con =this.jedisPool.getResource();
      con.hset(key, field, value);
    } finally {
      jedis.close();
    }
  }
}
